* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(200deg, #29323c, #485563);
}
@mixin m-color($color) {
    color: $color;
    &:hover .layer i {
        box-shadow: -1px 1px 3px $color;
    }
    .layer i {
        border-color: $color;
    }

    .text {
        color: $color;
    }
}

.icon-box {
    display: flex;
    flex-direction: row;
    a {
        color: #fff;
        margin: 0 30px;
        text-decoration: none;
        display: block;
        position: relative;

        &:nth-child(1) {
            @include m-color(#12b7f5);
        }
        &:nth-child(2) {
            @include m-color(#2aae67);
        }
        &:nth-child(3) {
            @include m-color(#e79115);
        }

        .layer {
            width: 70px;
            height: 70px;
            transition: 0.3s;
            i {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                border: 1px solid #fff;
                border-radius: 6px;
                transition: 0.3s;
                &.fa {
                    font-size: 35px;
                    text-align: center;
                    line-height: 70px;
                }
            }
        }
        .text {
            position: absolute;
            bottom: 0px;
            opacity: 0;
            width: 100%;
            text-align: center;
            transition: 0.3s;
        }
        &:hover {
            .text {
                bottom: -35px;
                opacity: 1;
            }
            .layer {
                transform: rotate(-35deg) skew(20deg);
                i {
                    box-shadow: -1px 1px 3px #fff;
                    @for $i from 1 to 6 {
                        &:nth-child(#{$i}) {
                            opacity: $i * 0.2;
                            transform: translate($i * 5px, $i * -5px);
                        }
                    }
                }
            }
        }
    }
}
